package me.jiatao.mybatisstudy.dao;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;

import java.io.Serializable;
import java.sql.Timestamp;

//自动生成getter setter tostring
@Data
@TableName(value = "USER_RED_PACKET",keepGlobalPrefix = true)
public class UserRedPacketPlusModel extends Model<UserRedPacketPlusModel> {
    private Long id;

    private Long redPacketId;
    private Long userId;
    private Double amount;
    private Timestamp grabTime;
    private String note;

    @TableField(exist = false)//非数据库表中字段
    private String otherThings;
    private static final long serialVersionUID = -5617482065991830143L;


    /**
     * 制定实体类的主键
     * @return
     */
    @Override
    protected Serializable pkVal() {
        return id;
    }


}
